package com.feng.gulimall.product;

import org.apache.ibatis.annotations.Mapper;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/*
* 整合Mybaits-Plus流程
* 1)导入依赖 mybatis-plus-boot-starter依赖
* 2)配置
*   1.配置数据源信息:
*       1)导入数据库的驱动 mysql-connector
*       2)在application.yml文件中配置数据源的配置信息
*   2.配置Mybatis-Plus
*       1)使用@MapperScan
*       2)告诉Mybatis-Plus sql映射文件的位置
*       3)给数据的表设置自增主键
*
* */
@EnableFeignClients(basePackages = "com.feng.gulimall.product.feign")   //开启远程调用功能，并标注扫描的包
@MapperScan("com.feng.gulimall.product.dao")
@SpringBootApplication
@EnableDiscoveryClient
public class GulimallProductApplication {
    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
